package com.yupi.maker.cli.command;

import cn.hutool.core.util.ReflectUtil;
import com.yupi.maker.model.MainTemplateConfig;
import picocli.CommandLine;

import java.lang.reflect.Field;

/**
 * @version 1.0
 * @Author moresuo
 * @Date 2024/9/9 16:58
 * @注释 配置命令，列出用户输入参数的类型
 */
@CommandLine.Command(name="config",mixinStandardHelpOptions = true)
public class ConfigCommand implements Runnable{
    @Override
    public void run() {
        //反射获取字段信息
        Field[] fields = ReflectUtil.getFields(MainTemplateConfig.class);
        for (Field field : fields) {
            System.out.println("字段名称："+field.getName()+" ， "+"字段类型："+field.getType().getSimpleName());
        }
    }
}
